package com.dalu.app.utils;

import android.content.Context;

import com.dalu.app.ui.App;


import static android.content.Context.MODE_PRIVATE;

/**
 * Created by zgh on 2018/1/1.
 * Mail zhangguanghui163@163.com
 */
public class SpUtils {


    private SpUtils() {

    }

    private static Context mAppContext = App.instance.getApplicationContext();



    public static void putLatitude(String latitude) {
        mAppContext.getSharedPreferences("config", MODE_PRIVATE).edit().putString("latitude", latitude).apply();
    }

    public static String getLatitude() {
        return mAppContext.getSharedPreferences("config", MODE_PRIVATE).getString("latitude", "");
    }


    public static void putLongitude(String longitude) {
        mAppContext.getSharedPreferences("config", MODE_PRIVATE).edit().putString("longitude", longitude).apply();
    }

    public static String getLongitude() {
        return mAppContext.getSharedPreferences("config", MODE_PRIVATE).getString("longitude", "");
    }


}
